import {getlink} from "@/api/getapi.js"
export let home = {
    state:{
        arr:[],
        list:[]
    },
    mutations:{
        demoarr(state,payload){
            state.arr = payload.data.sort;
            state.list = payload.data.list;
        }
    },
    actions:{
        demolink(context,payload){
            getlink(payload.url).then( (ok) => {
                console.log(ok)
                context.commit('demoarr',ok)
            }).catch( (err) => {
                console.log(err)
            })
        }
    }
}